<!--
  ~ MIT License
  ~
  ~ Copyright (c) 2021-2022 yangrunkang
  ~
  ~ Author: yangrunkang
  ~ Email: yangrunkang53@gmail.com
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in all
  ~ copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~ SOFTWARE.
  -->

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="index">
<!--css-->
<link th:fragment="css" type="text/css" rel="stylesheet" th:href="${ossStatic} + @{/css/user/manage/edit-user-info.css}"/>
<!--脚本-->
<script async="async" th:fragment="js" type="text/javascript" th:src="${ossStatic} + @{/js/user/manage/edit-user-info.js}"></script>
<div th:fragment="content">
    <!--内容管理-->
    <div class="container">
        <div class="row g-2">
            <!--右列-->
            <div class="col-lg-9 mb-2">
                <div class="card card-body shadow-sm border-bottom border-2 border-top-0 border-start border-end-0 p-2 mb-2">
                    <div th:replace="fragments/manage::user_settings('editUserInfo')"></div>
                    <form>
                        <div class="form-group row mb-3">
                            <label for="userName" class="col-sm-2 col-form-label">用户名</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="userName"
                                       placeholder="用户名"
                                       title="用户名提示"
                                       data-bs-container="body"
                                       data-bs-toggle="popover"
                                       data-bs-placement="right"
                                       data-bs-content="用户名为空"
                                       th:value="${memberIndexDto.member.userName}" />
                            </div>
                        </div>
                        <div class="form-group row mb-3">
                            <label for="email" class="col-sm-2 col-form-label">邮箱</label>
                            <div class="col-sm-10">
                                <input type="email" class="form-control" disabled id="email" placeholder="邮箱" readonly
                                       title="邮箱提示"
                                       data-bs-container="body"
                                       data-bs-toggle="popover"
                                       data-bs-placement="right"
                                       data-bs-content="邮箱输入不正确,请检查"
                                       th:value="${memberIndexDto.member.email}" />
                            </div>
                        </div>
<!--                        <div class="form-group row mb-3">-->
<!--                            <label for="phone" class="col-sm-2 col-form-label">手机号</label>-->
<!--                            <div class="col-sm-10">-->
<!--                                <input type="text" class="form-control" id="phone" placeholder="手机号"-->
<!--                                       title="手机号提示"-->
<!--                                       data-bs-container="body"-->
<!--                                       data-bs-toggle="popover"-->
<!--                                       data-bs-placement="right"-->
<!--                                       data-bs-content="手机号输入不正确,请检查"-->
<!--                                       th:value="${memberIndexDto.member.phone}" />-->
<!--                            </div>-->
<!--                        </div>-->
<!--                        <div class="form-group row mb-3">-->
<!--                            <label for="birthday" class="col-sm-2 col-form-label">生日</label>-->
<!--                            <div class="col-sm-10">-->
<!--                                <input type="text" class="form-control" id="birthday"-->
<!--                                       placeholder="生日"-->
<!--                                       title="生日提示"-->
<!--                                       data-bs-container="body"-->
<!--                                       data-bs-toggle="popover"-->
<!--                                       data-bs-placement="right"-->
<!--                                       data-bs-content="生日输入不正确,请检查"-->
<!--                                       th:value="${memberIndexDto.member.memberExtend.birthday}" />-->
<!--                            </div>-->
<!--                        </div>-->
                        <div class="form-group row mb-3">
                            <label for="introduce" class="col-sm-2 col-form-label">个人简介</label>
                            <div class="col-sm-10">
                                <textarea type="text" class="form-control" id="introduce" rows="4"
                                       placeholder="个人简介"
                                       th:text="${memberIndexDto.member.memberExtend.introduce}"
                                ></textarea>
                            </div>
                        </div>
                        <div class="form-group row mb-3">
                            <label for="introduce" class="col-sm-2 col-form-label">邮件开关</label>
                            <div class="col-sm-10">
                                <select class="form-control" id="openEmail">
                                    <option value="SUBSCRIBE_EMAIL" th:selected="${memberIndexDto.member.memberConfig?.openEmail.name() == 'SUBSCRIBE_EMAIL'}">开启</option>
                                    <option value="UN_SUBSCRIBE_EMAIL" th:selected="${memberIndexDto.member.memberConfig?.openEmail.name() == 'UN_SUBSCRIBE_EMAIL'}">关闭</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group mb-3">
                            <div class="row g-2">
                                <div class="col-lg-4"></div>
                                <div class="col-lg-4">
                                    <button type="submit" id="register" class="btn rounded-3 bg-gradient btn-primary">更新用户信息</button>
                                    <button type="button" class="btn rounded-3 bg-gradient btn-secondary">取消</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!--左列-用户信息-->
            <div class="col-lg-3">
                <div th:include="fragments/index::user_index_left"></div>
            </div>
        </div>
    </div>
</div>
</html>
